<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>东莞新华投票系统v1.0</title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <link rel="stylesheet" type="text/css" href="css/tipswindown.css" />
    <script src="js/jquery-1.5.2.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
</head>
<body id="detail-vote">

<?php

if (!isset($_COOKIE['islogin']) || $_COOKIE['islogin'] != 1) {
    echo "<script>window.lacation.href='login.php';</script>";
}

require('config.php');
$vsID = $_GET['action'];
//$vsID = 36;
$select_query_vs = "select description from vote_subject where vsID='$vsID'";
$result_query_vs = mysql_query($select_query_vs) or die(mysql_error());
$row_vs = mysql_fetch_array($result_query_vs);
$description = $row_vs[0];

$select_query_detail1 ="select users.name,vote_item.title from vote_item,(user_vi left join users on(user_vi.account=users.account)) where vote_item.viID=user_vi.viID and user_vi.vsID='$vsID'";
$result_query_detail = mysql_query($select_query_detail1);

$select_query_detail2 = "select name from users where account not in (select account from user_vi where vsID='$vsID')";
$result_query_detail2 = mysql_query($select_query_detail2);
$account = $_COOKIE['username'];
?>
<div id="nav">
    <div id="nav_top">
        <div class="width navs">
            <div class="logo">
                <a href="index.php"><img src="images/logo.png" width="290" height="54"/></a>
            </div>
            <div class="clear"></div>
        </div>
    </div>
    <div id="header">
        <div class="width">

        </div>
    </div>
</div>

<div id="content">
    <div id="main-content">
        <h3>本次投票明细</h3>
        <div id="left-table">
        <table>
            <caption>已投明细</caption>
            <tr>
                <th width="20">序号</th>
                <th width="50">姓名</th>
                <th width="50">被投姓名</th>
            </tr>

            <?php
            $num=0;
            while($row=mysql_fetch_row($result_query_detail)) {
                $num++;
                ?>
                <tr>
                    <td><?php echo $num; ?></td>
                    <td><?php echo $row[0]; ?></td>
                    <td><?php echo $row[1]; ?></td>
                </tr>
            <?php
            }
            ?>
        </table>
        </div>

        <div id="right-table">
        <table>
            <caption>未投明细</caption>
            <tr>
                <th width="20">序号</th>
                <th width="50">姓名</th>
            </tr>
            <?php
            $num=0;
            while($row=mysql_fetch_row($result_query_detail2)) {
                $num++;
                ?>
                <tr>
                    <td><?php echo $num; ?></td>
                    <td><?php echo $row[0] ?></td>
                </tr>
            <?php
            }
            ?>
        </table>
        </div>
    </div>
</div>






<div id="footer" class="clear">
    <div
        style="background: url(images/gx_footer.gif) no-repeat; width: auto; height: 118px; padding: 20px 0 0 0;">
        <div class="width">
            <div style="text-align: center; font-size: 14px;">
                <a href="http://10.44.152.49">东莞新华导航页</a> <a
                    href="http://10.44.152.252./purchase" class="a1" target="ifm">采购立项签报系统</a> <a
                    href="http://10.44.152.166:8080/che/">用车管理系统</a> <a href="http://10.44.152.166:8080/caigou/"
                    >采购随机筛选系统</a>
            </div>
            <div style="margin: 15px 0 0 0; font-size: 11px; text-align: center;">新华人寿保险股份有限公司东莞中心支公司
                版权所有 东莞新华办公室
            </div>
        </div>
    </div>
</div>

</body>
</html>